package com.ideal.dto.config.req;

import com.ideal.config.Constant;
import com.ideal.util.DateUtils;
import lombok.Data;

import java.util.Date;

/**
 * @Author songfz
 * @Description 配置文件分页查询条件
 * @Date 2022/7/20
 */
public class FileConfigPageReqDto {


    /**
     * 文件业务类型 1：解析类文件，2：展示类 3：通用配置类
     */
    private Long bizType;

    /**
     * 机型 C919,ARJ21,CXF
     */
    private String airplaneType;

    /**
     * 文件配置点类型 ECM/MCM,ECP,ECR,技术文件，视图，发送接收，代料单文件
     */
    private String configType;

    /**
     * 文件中文名称 展示使用
     */
    private String fileZhName;

    /**
     * 文件英文名称 英文名称唯一，作为数据查询的条件
     */
    private String fileEnName;

    /**
     * 权限组 操作权限
     */
    private String roleGroup;
    /**
     * 关键词搜索
     */
    private String keyword;
    /**
     * 状态
     */
    private Integer status;

    /**
     * 使用状态
     */
    private String useStatus;

    private String[] createdTime;
    /**
     * 开始时间
     */
    private Date startTime;

    /**
     * 结束时间
     */
    private Date endTime;

    private Integer pageSize;

    private Integer pageNum;

    public Long getBizType() {
        return bizType;
    }

    public void setBizType(Long bizType) {
        this.bizType = bizType;
    }

    public String getAirplaneType() {
        return airplaneType;
    }

    public void setAirplaneType(String airplaneType) {
        this.airplaneType = airplaneType;
    }

    public String getConfigType() {
        return configType;
    }

    public void setConfigType(String configType) {
        this.configType = configType;
    }

    public String getFileZhName() {
        return fileZhName;
    }

    public void setFileZhName(String fileZhName) {
        this.fileZhName = fileZhName;
    }

    public String getFileEnName() {
        return fileEnName;
    }

    public void setFileEnName(String fileEnName) {
        this.fileEnName = fileEnName;
    }

    public String getRoleGroup() {
        return roleGroup;
    }

    public void setRoleGroup(String roleGroup) {
        this.roleGroup = roleGroup;
    }

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getUseStatus() {
        return useStatus;
    }

    public void setUseStatus(String useStatus) {
        this.useStatus = useStatus;
    }

    public String[] getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(String[] createdTime) {
        this.createdTime = createdTime;
        if (createdTime.length == 2) {
            try {
                this.startTime = DateUtils.toDate(createdTime[0], Constant.DATE_PATTERN);
                this.endTime = DateUtils.toDate(createdTime[1], Constant.DATE_PATTERN);
            } catch (Exception e) {
            }
        }
    }

    public Date getStartTime() {
        return startTime;
    }


    public Date getEndTime() {
        return endTime;
    }


    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }
}
